package Person.ith_02;

 class Student {
    private String name ;
    private int age;

    //构造方法
    public Student()
    {
        System.out.println("无参构造方法");
    }
    public Student(String name)
    {
        this.name = name;
    }
    public Student(int age)
    {
        this.age =age;
    }
    public Student(String name,int age)
    {
        this.name = name;
        this.age = age;
    }
    public void show()
    {
        System.out.println(name+" "+age);
    }

}

public class StudentDemo {
    public static void main(String[] args) {
        Student sc = new Student();
        sc.show();
        Student sd = new Student("户");
           sd.show();
           Student sf = new Student(18);
           sf.show();
           Student sg = new Student("户",18);
    sg.show();
    }
}
